// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) fieldsfirst 
// Source File Name:   VOResult.java

package com.csc.contact.checkbill.utiltools.page;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

public class VOResult
    implements Serializable
{

    private List result;
    private Object rs[];
    private int rowNumber;
    private int totalRow;
    private int beginPage;
    private int pageSize;

    public VOResult()
    {
        result = null;
        rs = null;
        rowNumber = -1;
        totalRow = 0;
        beginPage = 0;
        pageSize = 10;
    }

    public VOResult(List result)
    {
        this.result = null;
        rs = null;
        rowNumber = -1;
        totalRow = 0;
        beginPage = 0;
        pageSize = 10;
        this.result = result;
        if(result != null)
        {
            rowNumber = result.size();
            totalRow = result.size();
        }
    }

    public VOResult(List result, int totalRow)
    {
        this.result = null;
        rs = null;
        rowNumber = -1;
        this.totalRow = 0;
        beginPage = 0;
        pageSize = 10;
        this.result = result;
        this.totalRow = totalRow;
        if(result != null)
            rowNumber = result.size();
    }

    public Collection getResult()
    {
        return result;
    }

    public Object getObject(int i)
    {
        if(rs == null)
            rs = result.toArray();
        return rs[i];
    }

    public void setBeginPage(int beginPage)
    {
        this.beginPage = beginPage;
    }

    public int getBeginPage()
    {
        return beginPage;
    }

    public int getRowNumber()
    {
        return rowNumber;
    }

    public void setRowNumber(int rowNumber)
    {
        this.rowNumber = rowNumber;
    }

    public int getTotalRow()
    {
        return totalRow;
    }

    public void setTotalRow(int totalRow)
    {
        this.totalRow = totalRow;
    }

    public void setPageSize(int pageSize)
    {
        this.pageSize = pageSize;
    }

    public int getPageSize()
    {
        return pageSize;
    }
}
